﻿using System;
using System.Collections.Generic;

using System.Text;
using QUANLYCHAMCONG.DAO.DAO;
using QUANLYCHAMCONG.BL.Entities;
using System.Data;

namespace QUANLYCHAMCONG.BL
{
    public class TemplateBUS
    {
        public TemplateBUS() { }
        public static bool Insert(Template cv)
        {
           TemplateDAO dao = new TemplateDAO();
            return dao.Insert(cv);
        }
        public static bool Update(Template cv)
        {
           TemplateDAO dao = new TemplateDAO();
            return dao.Update(cv);
        }
        public static bool Delete(Template cv)
        {
           TemplateDAO dao = new TemplateDAO();
            return dao.Delete(cv);
        }
        public static DataTable SelectAll()
        {
           TemplateDAO dao = new TemplateDAO();
            return dao.SelectALL();
        }
        public static DataTable SelectPK(Template cv)
        {
           TemplateDAO dao = new TemplateDAO();
            return dao.SelectByPK(cv);
        }
        public static string GetID()
        {
           TemplateDAO dao = new TemplateDAO();
            return "TEM" + dao.GetID().ToString();
        }
    }
}
